/**
 * Copyright (c) 2016 coderyuan.com. All Rights Reserved.
 *
 * EShop
 *
 * ResultBuilder.java created on 下午3:34
 *
 * @author yuanguozheng
 * @version 1.0.0
 * @since 16/3/4
 */
package com.coderyuan.web.api.kit.common;

import com.coderyuan.web.api.kit.models.ApiResultModel;

/**
 * ResultBuilder
 *
 * @author yuanguozheng
 */
public class ResultBuilder {

    public static ApiResultModel getSuccess(Object obj) {
        return new ApiResultModel(0, obj, null);
    }

    public static ApiResultModel getNoDataSuccess(String msg) {
        return new ApiResultModel(0, null, msg);
    }

    public static ApiResultModel getError(int code, String msg) {
        return new ApiResultModel(code, null, msg);
    }
}
